public class Test_Swap {
    public static void main(String[] args) {
        Data data = new Data();
        data.m=20;
        data.n=10;

       Test_Swap test = new Test_Swap();
       test.swap(data);
        System.out.println("m="+data.m+",n="+data.n);
    }
    public  void swap(Data data) {
        int temp=data.m;
        data.m=data.n;
        data.n=temp;
    }

}


